<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="__VIS__/css/bootstrap.min.css"/>
    <link href="__VIS__/css/lib/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="__VIS__/js/btr/jquery.treetable.css">
    <link rel="stylesheet" href="__VIS__/js/btr/jquery.treetable.theme.default.css">
    <link href="__VIS__/css/style.css" rel="stylesheet">
    <script src="__VIS__/js/lib/jquery.min.js"></script>
    <script type="text/javascript" src="__VIS__/js/tree/bootstrap-table.js"></script>
    <script type="text/javascript" src="__VIS__/js/tree/bootstrap-table-zh-CN.js"></script>
    <script type="text/javascript" src="__VIS__/js/btr/jquery.treetable.js"></script>
    <script>
        $(document).ready(function(){
                 $("#treeTable").treetable({
                       expandable : true,
                        initialState:"expanded",
                         //expandable : true
                        clickableNodeNames:true,//点击节点名称也打开子节点.
                        indent : 30//每个分支缩进的像素数。
                 });
            });

    </script>
    <style>
        tbody tr td:last-child {
       text-align: left;
        }

    </style>
</head>
<body>
<table id="treeTable" class="table">
    <tbody>
        {volist name="$info.menu" id="data"}
        {notempty name="$data.list"}
        <tr data-tt-id="{$data.id}" data-tt-parent-id="{$data.pid}"><td>{$data.name}</td></tr>
        {eq name="data.type" value="1"}
        <tr>
            <td>
                <input type="checkbox"  name="admin_menu_id[]" value="{$data.id}" {notempty name="$info.cate.permissions"}{volist name="$info.cate.permissions" id="datas"}{eq name="$datas" value="$data.id"}checked{/eq}{/volist}{/notempty}>{$data.name}
            </td>
        </tr>
        {/eq}
        {volist name="$data.list" id="vo"}
        <tr  data-tt-id="{$vo.id}" data-tt-parent-id="{$vo.pid}">
            {eq name="vo.is_display" value="1"}
            <td>
                <input type="checkbox"  name="admin_menu_id[]" value="{$vo.id}" {notempty name="$info.cate.permissions"}{volist name="$info.cate.permissions" id="datas"}{eq name="$datas" value="$vo.id"}checked {else /}{eq name="$vo.type" value="2"}checked disabled{/eq}{/eq}{/volist}{else /}{eq name="$vo.type" value="2"}checked disabled{/eq}{/notempty}>{$vo.name}
            </td>
            {else /}{eq name="vo.type" value="1"}
            <td>
                <input type="checkbox"  name="admin_menu_id[]" value="{$vo.id}" {notempty name="$info.cate.permissions"}{volist name="$info.cate.permissions" id="datas"}{eq name="$datas" value="$vo.id"}checked {else /}{eq name="$vo.type" value="2"}checked disabled{/eq}{/eq}{/volist}{else /}{eq name="$vo.type" value="2"}checked disabled{/eq}{/notempty}>{$vo.name}
            </td>
            {/eq}{/eq}
        </tr>
        {/volist}
        {else /}
        <tr>
            <td>
                <input type="checkbox" lay-ignore lay-skin="primary" name="admin_menu_id[]" value="{$data.id}" {notempty name="$info.cate.permissions"}{volist name="$info.cate.permissions" id="datas"}{eq name="$datas" value="$data.id"}checked{/eq}{/volist}{/notempty}>{$data.name}
            </td>
        </tr>
        {/notempty}
        {/volist}
    </tbody>
</table>

</body>
</html>